﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administration/main.master" AutoEventWireup="true" CodeBehind="Warranty_AddWarrantyNote.aspx.cs" Inherits="CS424_9pts.Administration.Warranty_AddWarrantyNote" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="server">
    <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" 
        AutoGenerateRows="False" DataKeyNames="WarrantyID" 
        DataSourceID="SqlDataSource1">
        <Fields>
            <asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" />
            <asp:CommandField ShowEditButton="True" />
        </Fields>
    </asp:DetailsView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CarManagementConnectionString %>" 
        DeleteCommand="DELETE FROM [Warranty] WHERE [WarrantyID] = @WarrantyID" 
        InsertCommand="INSERT INTO [Warranty] ([Note]) VALUES (@Note)" 
        SelectCommand="SELECT [Note], [WarrantyID] FROM [Warranty] WHERE ([WarrantyID] = @WarrantyID)" 
        UpdateCommand="UPDATE [Warranty] SET [Note] = @Note WHERE [WarrantyID] = @WarrantyID">
        <DeleteParameters>
            <asp:Parameter Name="WarrantyID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Note" Type="String" />
        </InsertParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="WarrantyID" QueryStringField="id" 
                Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="Note" Type="String" />
            <asp:Parameter Name="WarrantyID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>
